package com.njworkorder.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.bind.DefaultValue;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MeteringSortVO {

    private String id;

    @Schema(description = "计划名称")
    private String planName;

    @Schema(description = "工区名称")
    private String workspaceName;

    @Schema(description = "项目号")
    private String projectNo;

    @Schema(description = "项目名称")
    private String projectName;

    @Schema(description = "单价（元）")
    private String unitPrice;

    @Schema(description = "单位")
    private String unit;

    @Schema(description = "计划id")
    private String planId;

    @Schema(description = "父级id")
    private String parentId;

    @Schema(description = "创建时间")
    private Date publishTime;

    @Schema(description = "合同编号")
    private String contractNumber;

    @Schema(description = "合同开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date contractStartTime;

    @Schema(description = "合同结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date contractEndTime;

    @Schema(description = "计量清单数量")
    private BigDecimal amount;

    @Schema(description = "填写清单数量")
    private double amountM;

    @Schema(description = "总金额")
    private double totalAmount;

    @Schema(description = "工程量清单数量（总）")
    private Integer nums;

    @Schema(description = "计量清单使用数量")
    private Double useNum = 0D;

    @Schema(description = "维修机构名称")
    private String maintenanceOrganization;

    @Schema(description = "计划和计量清单关联id")
    private String planMeteringId;

    @Schema(description = "计划类型 (1、年度计划，2月度计划)")
    private String planType = "1";

    @Schema(description = "计价类型(1基本总价、2单价计量)")
    private String pricingType;

    @Schema(description = "子集")
    private List<MeteringSortVO> subset;
}
